<?php if(!defined("PATH_HD"))exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link type="text/css" rel="stylesheet" href="http://localhost/company01/data/css/base.css"/>
</head>
<body style="padding:10px;">
    <div class="path">
        <strong>您现在的位置：</strong>
        <a href="#">栏目管理</a>
    </div>
    <div class="send1">
        <a href="http://localhost/company01/index.php/admin/category/add_show"  class="current button1">添加顶级栏目</a>
    </div>
    <table class="table1">
        <thead>
            <tr>
                <td width="30">排序</td>
                <td width="30">catid</td>
                <td>栏目名称</td>
                <td width="160">所属模型</td>
                <td width="200">操作</td>
            </tr>
        </thead>
        <tbody>
        <?php if(!empty($category)){$listCount = count($category);$list_id=0;?><?php foreach($category as $key=>$v){?>
        <tr>
            <td width="30"><?php echo $v['sort'];?></td>
            <td width="30"><?php echo $v['catid'];?></td>
            <td><?php echo $v['html'];?>
        <?php if($v['level'] > 1){?> 
            └─<a href="http://localhost/company01/index.php/admin/news/index/catid/<?php echo $v['catid'];?>"><?php echo $v['cname'];?></a>
            <?php  }else{ ?><a href="http://localhost/company01/index.php/admin/news/index/catid/<?php echo $v['catid'];?>"><?php echo $v['cname'];?></a>
        <?php }?>
    </td>
    <td width="160">文章系统</td>
    <td width="200" style="font-size:12px;">
        <a href="http://localhost/company01/index.php/admin/category/add_show/catid/<?php echo $v['catid'];?>">添加子栏目</a> | 
        <a href="http://localhost/company01/index.php/admin/category/edit_show/catid/<?php echo $v['catid'];?>">修改</a> | 
        <a href="http://localhost/company01/index.php/admin/category/del/catid/<?php echo $v['catid'];?>">删除</a>
    </td>
</tr>
<?php $list_id+=1;?><?php }?><?php }?>
</tbody>  
</table>
<div class="send2">
    <a href="#" class="button1">排序</a>
</div>
</body>
</html>
